﻿using Mate.Core.Base;
using Mate.Db.Model.System;
using Mate.Db.SqlSugar;
using Mate.Dto.System;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mate.System.Service
{
    public interface IRolesService : IDataService<roles>
    {
        /// <summary>
        /// 获取所有角色
        /// </summary>
        /// <returns></returns>
        IList<roles> GetRoleAll();

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="Key">关键字</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="recordCount">总条数</param>
        /// <returns></returns>
        IList<roles> GetList(int pageIndex, int pageSize, string Key, ref int recordCount);

        /// <summary>
        /// 获取角色菜单
        /// </summary>
        /// <param name="rolesid"></param>
        /// <returns></returns>
        IList<role_menu> GetRoleMenuList(int rolesid);

        /// <summary>
        /// 根据角色获取菜单列表
        /// </summary>
        /// <param name="roleid"></param>
        /// <param name="isSuperAdmin"></param>
        /// <returns></returns>
        IList<menu> GetMenuAll(int roleid, bool isSuperAdmin);

        /// <summary>
        /// 根据角色获取导航列表
        /// </summary>
        /// <param name="roleid">角色ID</param>
        /// <param name="isSuperAdmin">是否是超级管理员</param>
        /// <returns></returns>
        IList<NavModel> GetNavAll(int roleid, bool isSuperAdmin);

        /// <summary>
        /// 权限设置
        /// </summary>
        /// <param name="roleid"></param>
        /// <param name="menuids"></param>
        BaseResult AuthorizationManager(int roleid, string menuids);
    }
}
